package md.mru.core.repositories;

import md.mru.core.domains.OrderPattern;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author sergiu.marin
 * @since 01.04.2014
 */
public interface OrderPatternRepository extends JpaRepository<OrderPattern, Long> {

    @Modifying
    @Query("DELETE FROM OrderPattern o WHERE o.id=:orderPatternId")
    void deleteOrderPattern(@Param(value = "orderPatternId") long orderPatternId);
}
